import { AxiosResponse } from "axios";

// create instance of axios
// export const request = axios.create({
//   baseURL: "https://api.github.com/",
// });

export const request = <T>(mockData: T) => {
  return new Promise<AxiosResponse<T, any>>((resolve, _) => {
    const response = { data: mockData } as AxiosResponse<T, any>;
    resolve(response);
  });
};
